/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gui;

/**
 *
 * @author sangnguyen
 */
public class MDIMainFrame extends javax.swing.JFrame {

    /**
     * Creates new form MDIMainFrame
     */
    public MDIMainFrame() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        desktopPane = new javax.swing.JDesktopPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuSanPham = new javax.swing.JMenu();
        jMenuKhuyenMai = new javax.swing.JMenu();
        jMenu3 = new javax.swing.JMenu();
        jMenu4 = new javax.swing.JMenu();
        jMenuCuaHang = new javax.swing.JMenu();
        jMenu6 = new javax.swing.JMenu();
        jMenuItemQLNhanVien = new javax.swing.JMenuItem();
        jMenuItemLoaiNV = new javax.swing.JMenuItem();
        jMenu7 = new javax.swing.JMenu();
        jMenuQuyDinh = new javax.swing.JMenu();
        jMenu9 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("STStores");
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setFocusTraversalPolicyProvider(true);
        setPreferredSize(new java.awt.Dimension(800, 700));
        setResizable(false);

        jMenu1.setText("Hệ thống");

        jMenuItem1.setText("Thay đổi thông tin");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem1);

        jMenuItem2.setText("Đăng xuất");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem2);
        jMenu1.add(jSeparator1);

        jMenuItem3.setText("Thoát");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem3);

        jMenuBar1.add(jMenu1);

        jMenuSanPham.setText("Sản Phẩm");
        jMenuBar1.add(jMenuSanPham);

        jMenuKhuyenMai.setText("Quản lý khuyến mãi");
        jMenuKhuyenMai.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jMenuKhuyenMaiMouseClicked(evt);
            }
        });
        jMenuBar1.add(jMenuKhuyenMai);

        jMenu3.setText("Hóa đơn");
        jMenuBar1.add(jMenu3);

        jMenu4.setText("Khách hàng");
        jMenuBar1.add(jMenu4);

        jMenuCuaHang.setText("Cửa hàng");
        jMenuCuaHang.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jMenuCuaHangMouseClicked(evt);
            }
        });
        jMenuBar1.add(jMenuCuaHang);

        jMenu6.setText("Nhân viên");

        jMenuItemQLNhanVien.setText("Quản lý nhân viên");
        jMenuItemQLNhanVien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemQLNhanVienActionPerformed(evt);
            }
        });
        jMenu6.add(jMenuItemQLNhanVien);

        jMenuItemLoaiNV.setText("Loại nhân viên");
        jMenuItemLoaiNV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemLoaiNVActionPerformed(evt);
            }
        });
        jMenu6.add(jMenuItemLoaiNV);

        jMenuBar1.add(jMenu6);

        jMenu7.setText("Thống kê");
        jMenuBar1.add(jMenu7);

        jMenuQuyDinh.setText("Quy định");
        jMenuQuyDinh.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jMenuQuyDinhMouseClicked(evt);
            }
        });
        jMenuQuyDinh.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuQuyDinhActionPerformed(evt);
            }
        });
        jMenuBar1.add(jMenuQuyDinh);

        jMenu9.setText("Tìm kiếm");
        jMenuBar1.add(jMenu9);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 720, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuQuyDinhActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuQuyDinhActionPerformed
        // TODO add your handling code here:
        JInternalFrameQuyDinh frmQuiDinh = new JInternalFrameQuyDinh();               
        this.desktopPane.add(frmQuiDinh);        
        frmQuiDinh.setVisible(true);
    }//GEN-LAST:event_jMenuQuyDinhActionPerformed

    private void jMenuQuyDinhMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenuQuyDinhMouseClicked
        // TODO add your handling code here:
        JInternalFrameQuyDinh frmQuiDinh = new JInternalFrameQuyDinh();        
        this.desktopPane.add(frmQuiDinh);
        frmQuiDinh.setVisible(true);
    }//GEN-LAST:event_jMenuQuyDinhMouseClicked

    private void jMenuItemQLNhanVienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemQLNhanVienActionPerformed
        // TODO add your handling code here:
        JInternalFrameNhanVien frmNhanVien = new JInternalFrameNhanVien();        
        this.desktopPane.add(frmNhanVien);
        frmNhanVien.setVisible(true);
    }//GEN-LAST:event_jMenuItemQLNhanVienActionPerformed

    private void jMenuItemLoaiNVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemLoaiNVActionPerformed
        // TODO add your handling code here:
        JInternalFrameLoaiNV frmLoaiNV = new JInternalFrameLoaiNV();
        this.desktopPane.add(frmLoaiNV);
        frmLoaiNV.setVisible(true);
    }//GEN-LAST:event_jMenuItemLoaiNVActionPerformed

    private void jMenuCuaHangMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenuCuaHangMouseClicked
        // TODO add your handling code here:
        JInternalFrameCuaHang frmCuaHang = new JInternalFrameCuaHang();
        this.desktopPane.add(frmCuaHang);
        frmCuaHang.setVisible(true);
    }//GEN-LAST:event_jMenuCuaHangMouseClicked

    private void jMenuKhuyenMaiMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenuKhuyenMaiMouseClicked
        // TODO add your handling code here:
        JInternalFrameChuongTrinhKhuyenMai frmChuongtrinhKhuyenMai = new JInternalFrameChuongTrinhKhuyenMai();
        this.desktopPane.add(frmChuongtrinhKhuyenMai);
        frmChuongtrinhKhuyenMai.setVisible(true);
    }//GEN-LAST:event_jMenuKhuyenMaiMouseClicked

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        JInternalFrameThayDoiThongTin frmDoiThongTin = new JInternalFrameThayDoiThongTin();
        this.desktopPane.add(frmDoiThongTin);
        frmDoiThongTin.setVisible(true);
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        this.dispose();
        JFrameDangNhap frmDangNhap = new JFrameDangNhap();
        frmDangNhap.setVisible(true);
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MDIMainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MDIMainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MDIMainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MDIMainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new MDIMainFrame().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane desktopPane;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenu jMenu7;
    private javax.swing.JMenu jMenu9;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenu jMenuCuaHang;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItemLoaiNV;
    private javax.swing.JMenuItem jMenuItemQLNhanVien;
    private javax.swing.JMenu jMenuKhuyenMai;
    private javax.swing.JMenu jMenuQuyDinh;
    private javax.swing.JMenu jMenuSanPham;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    // End of variables declaration//GEN-END:variables
}
